import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.UnsupportedEncodingException;


public class FileIO {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		File file = new File("abc.txt");
		
		BufferedWriter writer;
		try {
			writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file,false), "UTF-8"));
				writer.write("123456\r\n");
			writer.close();
		} catch (UnsupportedEncodingException e) {		
		} catch (FileNotFoundException e) {		
		} catch (IOException e) {			
		}
		
	}

}
